package eu.flatworld.android.ontop.db;

import java.io.Serializable;
import java.util.UUID;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "checklistitem")
public class ChecklistItem implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@DatabaseField(id = true)
	UUID id;
	
	@DatabaseField(canBeNull = false)
	String name;
	
	@DatabaseField(canBeNull = false)
	boolean checked;
	
	@DatabaseField(canBeNull = false, foreign = true, index = true)
	Memo memo;
	
	public ChecklistItem() {
		id = UUID.randomUUID();
		checked = false;
	}
	
	public String toString() {
		return name;
	}

	public UUID getId() {
		return id;
	}

	public void setId(UUID id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public Memo getMemo() {
		return memo;
	}

	public void setMemo(Memo memo) {
		this.memo = memo;
	}
	
	
}
